<template>
  <div style="height: 100%;width: 100%; background: #f2f2f2;">
    <PortletTab :data="portletTab" :clickTabCallback="clickTab" :portletTab="portletTab" :tabActive="tabActive">

      <div slot="body">
        这是一个PortletTab测试案例

        <h4>只能输入整数</h4>
        <el-input v-model="inputInt" placeholder="只能输入整数" v-enter-number-int></el-input>

        <h4>自定义输入浮点型位数 默认俩位小数</h4>
        <el-input v-model="inputFloat" v-enter-number-float="2" placeholder="自定义输入浮点型"></el-input>


        <!--        <nuxt-child></nuxt-child>-->

        <!--         这个是拖拽card-->
        <PortletCard title="这是一个可拖拽的" :visible.sync="visible" member="student" textAlign="center">
          <template slot="header">

          </template>
          <template slot="body">
            <!--     签到倒计时-->
            <el-button style="width: 120px;background:#105cfb;color: #fff;border: none;margin-top: 25px" size="small">立即签到</el-button>
          </template>
        </PortletCard>


      </div>
    </PortletTab>
    <Footer/>
  </div>
  <!--  -->
</template>

<script>
export default {
  name: "tab",

  data() {
    return {
      tabActive: 'doc',
      inputInt: '',
      inputFloat: '',
      visible: true,
      portletTab: [
        {
          name: "doc",
          label: "文档",
          url: "/",

        },
        {
          name: "expert",
          label: "专栏",
          url: "/test",
        },
      ],
    }
  },
  mounted() {
    this.$parent.active = "104"
  },
  methods: {
    clickTab(tabData) {
      this.tabActive = tabData.name
      this.$router.push(tabData.url)
    },
    refresh() {
      console.log('刷新')
    },
  }
}
</script>

<style scoped>

</style>
